from selenium import webdriver
import time
driver = webdriver.Chrome()
driver.get('https://www.baidu.com')
print(driver.name)
print(driver.current_url)
print(driver.title)
# print(driver.page_source)
print(driver.current_window_handle)
driver.find_element_by_link_text('新闻').click()
print(driver.window_handles)

driver.maximize_window()
time.sleep(1)

print(driver.find_element_by_id('kw').id)

kw_element = driver.find_element_by_id('kw')
print(kw_element.size)
print(kw_element.rect)
print('input11:',kw_element.text)

news_element = driver.find_element_by_link_text('新闻')
print('a：', news_element.text)



driver.quit()